package com.aizuda.boot.modules.business.contract.entity;

import com.aizuda.boot.modules.common.constant.enums.DisplayTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 合同流程与表单字段关联实体类
 *
 * @Author sangyirong
 * @Version 1.0
 * @Date 2025/5/20 13:36
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("contract_workflow_form_field")
public class ContractWorkflowFormFieldEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "关联ID")
    private Long id;

    @Schema(description = "合同模块ID")
    private Integer moduleId;

    @Schema(description = "表单模版ID")
    private Long workflowId;

    @Schema(description = "字段ID")
    private Long fieldId;

    @Schema(description = "在该流程中该字段是否必填")
    private Boolean isRequired;

    @Schema(description = "字段在该流程表单中的显示顺序")
    private Integer fieldOrder = 1;

    @Schema(description = "字段提示内容（输入框内的提示文本）")
    private String placeholderText;

    @Schema(description = "字段空状态说明文本")
    private String emptyStateText;

    @Schema(description = "字段是否隐藏")
    private Boolean isHidden;

    @Schema(description = "字段是否启用")
    private Boolean isEnabled;

    @Schema(description = "字段引导说明内容")
    private String helpContent;

    @Schema(description = "引导说明展示方式：BUBBLE-气泡卡片，BELOW-展示在字段下方")
    private DisplayTypeEnum helpDisplayType;

    @Schema(description = "创建时间")
    private Date createdAt;

    @Schema(description = "更新时间")
    private Date updatedAt;

    @Schema(description = "删除标识（0：否[默认]，1：是）")
    @TableLogic
    private Boolean isDeleted;

    @Schema(description = "字段默认值")
    private String defaultValue;
}
